package com.icss.lesson2;

public class Meinv {
    public void baomao(Cat cat) {
        cat.sleep();
    }
}
class Cat {

    public void sleep() {
        System.out.println("---Cat@sleep()------");
    }
}
class YingDuan extends Cat {
    @Override
    public void sleep() {
        System.out.println("---YingDuanCat@sleep()------");
    }
}
class Buou extends Cat {
    @Override
    public void sleep() {
        System.out.println("---BuouCat@sleep()------");
    }
}